---
title: Getting Started
description: Quick start guide for self-hosting c15t with the @c15t/backend package.
lastModified: 2025-09-08
---

## DB Setup + Migrations

<Steps>
  <Step>
    ### Run the Self Host CLI

    <PackageCommandTabs command="@c15t/cli" />
  </Step>
</Steps>

## Manual Setup

<Steps>
  <Step>
    ### Install `@c15t/backend` Package

    <PackageCommandTabs mode="install" command="@c15t/backend" />
  </Step>

  <Step>
    ### Create a c15t instance

    ```tsx title="c15t.ts"
    import { c15tInstance } from '@c15t/backend/v2';
    import { kyselyAdapter } from '@c15t/backend/v2/db/adapters/kysely';
    import { Kysely } from 'kysely';

    const handler = c15tInstance({
      appName: 'example-app',
      basePath: '/',
      adapter: kyselyAdapter({
        db: new Kysely({ }),
        provider: 'postgresql',
      }),
      trustedOrigins: ['localhost', 'vercel.app'],
      advanced: {
        disableGeoLocation: true,
        openapi: {
          enabled: true,
        },
      },
      logger: {
        level: 'debug',
      },
    });

    const handleRequest = async (request: NextRequest) => handler.handler(request);
    ```
  </Step>
</Steps>
